<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
  <head>
    <title>TicketsLK</title>
    <%= stylesheet_link_tag "main" , :media => "all" %>

    <%= javascript_include_tag :defaults %>

  </head>
  <body>





    <div id="fb-root"></div>

    <script src="http://connect.facebook.net/en_US/all.js">
    </script>
    <script>
      FB.init({
        appId:'190595750993222', cookie:true,
        status:true, xfbml:true
      });

    </script>

    <script>
      function login1() {

        //FB.login(function(response) {
        //if (response.session) {
        FB.api('/me', function(user) {
          if(user != null && user.id != null) {
            alert('Facebook login successful');
            var url= "/user/fb_chk?fb_id="+user.id
            location.href  = url;
          }
        });



        // } else {
        // user cancelled login
        // }
        //});
      }




      function login2() {

        FB.login(function(response) {
        if (response.session) {
        FB.api('/me', function(user) {
          if(user != null && user.id != null) {
            alert('Facebook login successful');
            var url= "/user/fb_chk?fb_id="+user.id
            location.href  = url;
          }
        });



         } else {
        // user cancelled login
         }
        });
      }








    </script>
    <%= yield %>

  </body>


  <% if h flash[:message] %>
    <div id="notice">
      <%= h flash[:message] %>
    </div>
  <% end %>
  <% if h flash[:error] %>
    <div id="notice">
      <%= h flash[:error] %>
    </div>
  <% end %>
</html>